<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="/css/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">添加阅读</div>
    <div class="main_soso">
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="100%" style="border-left:none;text-align: left;font-weight: normal;"><span style="color:#229BC1;font-weight: bold;">订单基本信息</span> </th>
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
        <form action="/article/su_article.shtml" name="article" method="post"   enctype="multipart/form-data">
         <input type="hidden" name="id" value="${article.articleId}" />
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
	      <tbody>
	         <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" >标题：</td>
	              <td> <input type="text" name="article.title" value="${article.title}" maxlength="32"/></td>
             </tr>
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" >描述：</td>
	              <td> <input type="text" name="article.description" value="${article.description}" maxlength="32"/></td>
             </tr>
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">显示类型：</td>
	              <td> 
	                 <select name="article.viewType">
	                   <option value="small" <c:if test="${article.viewType=='small'}">selected="selected"</c:if>>小图</option>
	                   <option value="large" <c:if test="${article.viewType=='large'}">selected="selected"</c:if>>大图</option>
	                   <option value="grid" <c:if test="${article.viewType=='grid'}">selected="selected"</c:if>>三张图</option>
	                 </select>
	              </td>
             </tr>
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">文章分类：</td>
	              <td> 
	                 <select name="article.cate">
	                    <app:cons_select code="002" type="tree" value="${article.cate}"></app:cons_select>
	                 </select>
	              </td>
             </tr>
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">宠物标签：</td>
	              <td> 
	                 <select name="article.petCate">
	                    <option value="">请选择...</option>
	                    <app:cons_select code="003" value="${article.petCate}" type="tree"></app:cons_select>
	                 </select>
	              </td>
             </tr>
            
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">年龄标签：</td>
	              <td> 
	                 <select name="article.ageCate">
	                    <option value="">请选择...</option>
	                    <app:cons_select code="004" value="${article.ageCate}"></app:cons_select>
	                 </select>
	              </td>
             </tr>
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">所属专题：</td>
	              <td> 
	                 <select name="article.subjectId">
	                    <option value="">无专题...</option>
	                    <c:forEach items="${sub_list}" var="sub">
	                       <option value="${sub.id }">${sub.title} (第${sub.id}期)</option>
	                    </c:forEach>
	                 </select>
	              </td>
             </tr>
             
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">是否显示：</td>
	              <td> 
	                 <input type="checkbox" name="article.state" value="1" <c:if test="${article.state!='0'}">checked="checked"</c:if> />
	              </td>
             </tr>
              <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">图片一：</td>
	              <td> 
	                   <input type="file" name="image1" value="" />
	                   <c:if test="${!empty article.image1}"><br/>
	                      <img src="${article.image1}" width="80" />
	                   </c:if>
	              </td>
             </tr>
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">图片二：</td>
	              <td> 
	                   <input type="file" name="image2" value="" />
	                   <c:if test="${!empty article.image2}"><br/>
	                      <img src="${article.image2}" width="80" />
	                   </c:if>
	              </td>
             </tr>
             <tr>
	              <td width="25%" style="background:#F0F8FF;text-align: right;" align="right">图片三：</td>
	              <td> 
	                   <input type="file" name="image3" value="" />
	                   <c:if test="${!empty article.image3}"><br/>
	                      <img src="${article.image3}" width="80" />
	                   </c:if>
	              </td>
             </tr>
             
              <tr>
	              <td colspan="2"> <textarea rows="3" cols="30" name="article.text">${article.text}</textarea>
	              </td>
             </tr>
             <tr>
	              <td colspan="2"> <input type="button" onclick="_sumbit(this)" value="确定" />
	              </td>
             </tr>
         </tbody>
	    </table>
	  </form>
  </div>
</div>
<br/>
<br/>
<br/>
<br/>
<br/>
</body>
</html>
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script> 
<script type="text/javascript">
 var editor = CKEDITOR.replace('article.text',{width:640});
 
 function _sumbit(th){
	 document.article.submit();
 }
 
</script>
